/**
 * Copyright (C) 2025 ROKAE (Beijing) Technology Co., LTD.
 * All Rights Reserved.
 *
 * Information in this file is the intellectual property of Rokae Technology Co., Ltd,
 * And may contains trade secrets that must be stored and viewed confidentially.
 *
 * @file ElectricClawPlugin.h
 * @brief 初始化 UI 界面，并注册 RL 指令
 */
#ifndef ELECTRICCLAWPLUGIN_H
#define ELECTRICCLAWPLUGIN_H

#include "ElectricClawPlugin_global.h"
#include "plugincommon.h"
#include "interface/interfacemanager.h"

#include "ElectricClawWidget.h"
#include "rl/rlmanager.h"
#include "rl/RLStartWidget.h"
#include "rl/RLStopWidget.h"
#include "rl/RLStatusWidget.h"


namespace xplugin
{
// 电动夹爪插件类，继承自 PluginBase。
// 负责初始化 UI 界面，并注册 RL 指令用于流程控制平台调用。
class ELECTRICCLAWPLUGIN_EXPORT ElectricClawPlugin : public PluginBase
{
    Q_OBJECT
public:
    ElectricClawPlugin(QObject* parent = nullptr);

protected:

    /**
     * @brief 初始化插件界面
     */
    void init() override;

    /**
     * @brief 注册RL指令
     */
    void afterInit() override;

private:
    ElectricClawWidget* m_widget;
    xplugin::RLManager* m_rlManager;    // RL 指令管理器，用于注册流程脚本命令
};

}

#endif // ELECTRICCLAWPLUGIN_H
